<?php
function strHandle($str) {
    $result = '';
    $arr = explode('_', $str);
    foreach ($arr as $value) {
        $result .= ucfirst($value);
    }
    return $result;
}
echo strHandle('open_door');